{include file="admin/top.php" subject='income'}
{include file="income/top.php" subject='income'}

<div id="content">
  <form method="post">
  {income limit=1 id=$segment.purchases_id status=view}
    <table width="100%" border="0" cellpadding="5" cellspacing="0" id="editor">
      <tr>
        <td width="100" class="title">仓库:</td>
        <td class="content">{$income.shop}</td>
      </tr>
      <tr>
        <td class="title">产品名称:</td>
        <td class="content">{$income.product} {$income.spec} / {$income.unit}&nbsp;</td>
      </tr>
      <tr>
        <td class="title">批号:</td>
        <td class="content">{$income.lotnumber}</td>
      </tr>
      <tr>
        <td class="title">单价:</td>
        <td class="content">{$income.pricebuy|string_format:"%.2f"} 元</td>
      </tr>
      <tr>
        <td class="title">数量:</td>
        <td class="content">{$income.number+0}</td>
      </tr>
      <tr>
        <td class="title">总价:</td>
        <td class="content"><strong>{$income.pricebuy*$income.number|string_format:"%.2f"} 元</strong></td>
      </tr>
      <tr>
        <td class="title">保质期:</td>
        <td class="content">{$income.timeend|date_format:"%Y-%m-%d"}</td>
      </tr>
      <tr>
        <td class="title">入库时间:</td>
        <td class="content">{if $income.timestocked}{$income.timestocked|date_format:"%Y-%m-%d"}{/if}</td>
      </tr>
      <tr>
        <td class="title">供货商:</td>
        <td class="content">{$income.supplier}&nbsp;</td>
      </tr>
      <tr>
        <td class="title">备注说明:</td>
        <td class="content">{$income.memo|nl2br}&nbsp;</td>
      </tr>
      <tr class="noline">
        <td class="title">条码数字:</td>
        <td class="content">{$income.barcode}&nbsp;</td>
      </tr>
    </table>
    
    <div class="fr mt10">
    {if $income.timestocked==0}{if $income.timeexpress}<a class="btn" href="{$site_admin}m=inventory&s=income.php&purchases_id={$income.id}&uri=stockcancel" onclick="return confirm('操作不可恢复, 确定取消入库?')">取消入库？</a>{/if}{/if}
    <a href="{$site_admin}m=inventory&s=income.php&page={$smarty.get.page}&status={$smarty.get.status}" class="btn" >返回</a> 
    </div>
    {/income}
  </form>
</div>
{include file="admin/bottom.php"}
</body>
</html>
